﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace SimulationPresenter.UI
{
    public delegate void StringLogger(string message);

    public static class LogManager
    {
        public static StringLogger GenericLogger = new StringLogger((x) => { Console.WriteLine(x); });

        #region Info Logger
        public static StringLogger InfoLogger;
		public static void LogInfo(string inputString)
        {
            InfoLogger(inputString);
            GenericLogger(inputString);
        }

        public static void LogInfo(string formatString, params object[] list)
        {
            LogInfo(string.Format(formatString, list));
        } 
	    #endregion

        #region Error Logger
        public static StringLogger ErrorLogger;
        public static void LogError(string inputString)
        {
            ErrorLogger(inputString);
            GenericLogger(inputString);
        }

        public static void LogError(string formatString, params object[] list)
        {
            LogError(string.Format(formatString, list));
        }
        #endregion

        #region Debug Logger
        public static void LogDebug(string inputString)
        {            
            //GenericLogger(inputString);
        }

        public static void LogDebug(string formatString, params object[] list)
        {
            LogDebug(string.Format(formatString, list));
        }
        #endregion
    }
}
